package de.tum.in.eist.poll.client.views;

import com.google.gwt.user.client.ui.FlexTable;
import com.google.gwt.user.client.ui.HorizontalPanel;
import com.google.gwt.user.client.ui.Label;
import com.google.gwt.user.client.ui.VerticalPanel;

import de.tum.in.eist.poll.client.views.widgets.SpinBoxWidget;

/**
 * 
 * @author Sebastian Hofstetter
 *
 */
public class UserManagementView extends View {
	private VerticalPanel userManagementPanel = new VerticalPanel();
	
	private FlexTable table = new FlexTable();
	private SpinBoxWidget amount = new SpinBoxWidget(0,10000,1);
	
	public UserManagementView() {
		super();
		table.setText(0, 0, "student ID");
		table.setText(0, 1, "password");
		table.setText(0, 2, "remove student");
		userManagementPanel.add(table);
		
		// controls for adding any amount of students
		// TODO: restrict that amount and give an error message
		//       if a malformed number is given
		HorizontalPanel addStudentsBox = new HorizontalPanel();
		addStudentsBox.add(new Label("Number of students to add"));
		addStudentsBox.add(amount);
		userManagementPanel.add(addStudentsBox);
		
		initWidget(userManagementPanel);
		userManagementPanel.addStyleName("userManagementView");
	}
}
